package com.scalar.chiptrack.sales;

import com.scalar.chiptrack.utils.StringUtils;

//import com.scalar.chiptrack.utils.StringUtils;

/**
 * User: Sharath
 * Date: Jan 29, 2004
 * Time: 12:10:18 PM
 */

public class SalesOrderInvoiceLineItem
{
    // Sales Invoice Line Item related Variables
    private int     mInvoiceDocumentType;                   // Stores Sales Invoice Document Type information
    private String  mInvoiceNumber;                         // Stores  the Invoice Number information
    private int     mInvoiceLineItemSequenceNo = 16384;     // This sequence no is used to store Lineitems along with Invoice number.
    private String  mMarketingPartNo;                       // Stores Marketing Part No information
    private int     mQuantity;                              // Stores Quantity information
    private double  mUnitCost;                              // Stores Unit Cost information
    private double  mExtendedPrice;                         // Stores Extended Cost information
    private double  mUnitPrice;                             // Stores the Unit Price Information
    private String  mLineItemDescription;                   // Stores Line Item Description information
    private int     mOldLineItemCount;                      // Stores the count of Existing Line Items before we all new Line items..
    private double  mMarkDown;                              // Stores the mark Down Information
    private int mInvoiceIndex;                              // Stores teh Invoice Index Information

    // Added on 21 st march 04 for Displaying all Line items
    private boolean mLineItemSave;                  // Stores the Status of the line items to be saved or not.
    private boolean mDisableCheckBox;               // Stores the check box status.
    private String mSalesOrderNumber;               // Stores the Sales Order Number Information

    //Added by rohan on March 31 2004 for displaying line item bases on packing slip data
    private int mCustomerShippingLineItemID;
    private int mCustomerShippingID;
    private String mCustomerShippingLabel;

    //Stores the user requested ship date. This is taken as the doc date if the line item is entered in the sales
    //invoice and not loaded from the sales order or packing slip data
    private String mRequestedShipDate = "1/1/1900";

    //Stores the list of lots from which this line item quantity has been pulled
    private SalesOrderInvoiceLineItemLotList mLotList = null;

    private String mGpLocation = "";

    // Added this property for grouping the lineitems
    private String salesOrderNumberAndGpLocation = "";
    private String customerName = "";

    public SalesOrderInvoiceLineItem()
    {
        mInvoiceDocumentType    = 0;
        mInvoiceNumber          = "";
        mMarketingPartNo        = "";
        mQuantity               = 0;
        mUnitCost               = 0.00;
        mExtendedPrice          = 0.00;
        mUnitPrice              = 0.00;
        mLineItemDescription    = "";
        mOldLineItemCount       = 0;
        mMarkDown               = 0.00;
        mInvoiceIndex           = 1;
        mLineItemSave           = false;
        mDisableCheckBox        = false;
        mSalesOrderNumber       = "";
        mRequestedShipDate      = "1/1/1900";
        mCustomerShippingLineItemID = -1;
        mCustomerShippingID         = -1;
        mCustomerShippingLabel      = "";
        mLotList                = new SalesOrderInvoiceLineItemLotList();
    }

    public int getInvoiceDocumentType()
    {
        return mInvoiceDocumentType;
    }

    public void setInvoiceDocumentType( int invoiceDocumentType )
    {
        mInvoiceDocumentType = invoiceDocumentType;
    }

    public String getInvoiceNumber()
    {
        return mInvoiceNumber;
    }

    public void setInvoiceNumber( String invoiceNumber )
    {
        mInvoiceNumber = invoiceNumber;
    }

    public int getInvoiceLineItemSequenceNo()
    {
        return mInvoiceLineItemSequenceNo;
    }

    public void setInvoiceLineItemSequenceNo( int invoiceLineItemSequenceNo )
    {
        mInvoiceLineItemSequenceNo = invoiceLineItemSequenceNo;
    }

    public String getMarketingPartNo()
    {
        return mMarketingPartNo;
    }

    public void setMarketingPartNo( String marketingPartNo )
    {
        mMarketingPartNo = marketingPartNo;
    }

    public int getQuantity()
    {
        return mQuantity;
    }

    public void setQuantity( int quantity )
    {
        mQuantity = quantity;
    }

    public String getUnitCostAsString()
    {
        return StringUtils.formatAmount( mUnitCost, "$###,###.##" );
    }
    public double getUnitCost()
    {
        return mUnitCost;
    }

    public void setUnitCost( double unitCost )
    {
        mUnitCost = unitCost;
    }

    public String getExtendedPriceAsString()
    {
        return StringUtils.formatAmount( mExtendedPrice, "$###,###.##" );
    }

    public double getExtendedPrice()
    {
        return mExtendedPrice;
    }

    public void setExtendedPrice( double extendedPrice )
    {
        mExtendedPrice = extendedPrice;
    }

    public String getUnitPriceAsString()
    {
        return StringUtils.formatAmount( mUnitPrice, "$###,###.##" );
    }

    public double getUnitPrice()
    {
        return mUnitPrice;
    }

    public void setUnitPrice( double unitPrice )
    {
        mUnitPrice = unitPrice;
    }

    public String getLineItemDescription()
    {
        return mLineItemDescription;
    }

    public void setLineItemDescription( String lineItemDescription )
    {
        mLineItemDescription = lineItemDescription;
    }

    public int getLineItemCount()
    {
        return mOldLineItemCount;
    }

    public void setLineItemCount( int oldLineItemCount )
    {
        mOldLineItemCount = oldLineItemCount;
    }

    public String getMarkDownAsString()
    {
        return StringUtils.formatAmount( mMarkDown, "$###,###.##" );
    }

    public double getMarkDown()
    {
        return mMarkDown;
    }

    public void setMarkDown( double markDown )
    {
        mMarkDown = markDown;
    }

    public int getInvoiceIndex()
    {
        return mInvoiceIndex;
    }

    public void setInvoiceIndex( int invoiceIndex )
    {
        mInvoiceIndex = invoiceIndex;
    }
    public boolean isLineItemSave()
    {
        return mLineItemSave;
    }

    public void setLineItemSave( boolean lineItemSave )
    {
        mLineItemSave = lineItemSave;
    }
    public boolean isDisableCheckBox()
    {
        return mDisableCheckBox;
    }

    public void setDisableCheckBox( boolean disableCheckBox )
    {
        mDisableCheckBox = disableCheckBox;
    }

    public String getSalesOrderNumber()
    {
        return mSalesOrderNumber;
    }

    public void setSalesOrderNumber( String salesOrderNumber )
    {
        mSalesOrderNumber = salesOrderNumber;
    }

    public int getCustomerShippingID()
    {
        return mCustomerShippingID;
    }

    public void setCustomerShippingID( int customerShippingID )
    {
        this.mCustomerShippingID = customerShippingID;
    }

    public String getCustomerShippingLabel()
    {
        return mCustomerShippingLabel;
    }

    public void setCustomerShippingLabel( String customerShippingLabel )
    {
        this.mCustomerShippingLabel = customerShippingLabel;
    }

    public int getCustomerShippingLineItemID()
    {
        return mCustomerShippingLineItemID;
    }

    public void setCustomerShippingLineItemID( int customerShippingLineItemID )
    {
        this.mCustomerShippingLineItemID = customerShippingLineItemID;
    }

    public String getRequestedShipDate()
    {
        return mRequestedShipDate;
    }

    public void setRequestedShipDate( String requestedShipDate )
    {
        this.mRequestedShipDate = requestedShipDate;
    }

    public SalesOrderInvoiceLineItemLotList getLotList()
    {
        return mLotList;
    }

    public void setLotList( SalesOrderInvoiceLineItemLotList lotList )
    {
        this.mLotList = lotList;
    }

    public String getGpLocation()
    {
        return mGpLocation;
    }

    public void setGpLocation( String gpLocation )
    {
        this.mGpLocation = gpLocation;
    }

    public String getSalesOrderNumberAndGpLocation()
    {
        return salesOrderNumberAndGpLocation;
    }

    public void setSalesOrderNumberAndGpLocation( String salesOrderNumberAndGpLocation )
    {
        this.salesOrderNumberAndGpLocation = salesOrderNumberAndGpLocation;
    }

    public String getCustomerName()
    {
        return customerName;
    }

    public void setCustomerName( String customerName )
    {
        this.customerName = customerName;
    }
}